package com.kaifamiao.www.demo.Do28;

public class Person {
    static int num = 2;
    String name;

    public void eat(){
        System.out.println("吃米饭");
    }
    //static 方法能被继承，不能被重写
    public static void show(){
        System.out.println("Person:show()");
    }
}
class Man extends Person{
    static int num = 1;
    //隐藏
    public static void show(){
        System.out.println("Man show()");
    }
    @Override
    public void eat(){
        System.out.println("吃肉");
    }

    public static void main(String[] args) {
        System.out.println(num);
        show();

        Man man = new Man();
        man.eat();
    }
}
